# Maintainer: Dekedro <dekedro@protonmail.com>
pkgname=espeakup
pkgver=0.90
pkgrel=2
pkgdesc="Lightweight connector for espeak and speakup"
url="https://github.com/linux-speakup/espeakup"
arch="all !s390x" # s390x blocked by espeak-ng
license="GPL-3.0-or-later"
options="!check" # no tests
makedepends="alsa-lib-dev espeak-ng-dev meson"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/linux-speakup/espeakup/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	modules-load.conf
	"

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname

	install -Dm644 "$srcdir"/modules-load.conf \
		"$pkgdir"/usr/lib/modules-load.d/$pkgname.conf
}

sha512sums="
0731835a04063c5eac8ed0ed37cd92cc5d2dd1c58cbd94e158b7dfbb7bc0e2f84a6484fffd9009bf2920652a36fb737044b2e1fb67fb1679ee7150855bc9a15e  espeakup-0.90.tar.gz
54959d3fcc503f0579a38cc921ffa7ca530aecfcd84ec2a995d3a00b025904f6771ead9da1f9c0655e6a72d4451a1c816b7f2ea7ed38d797673e0c9a8ecca847  espeakup.initd
b9126271274821a228045ab3c15b2ec3d1738f7d97851510fac30308387a48aeb7fa634fa45a09a0ae74ae1c5db1352833d2c49e542187b38835b365d80b49a2  espeakup.confd
af8e8591fd6320dba20a8fe1b6e126f2ae45dfc0286c4c68e508f8141af940a5af43567ed0db4f5534fdfc91124a42619b9ca92de921a279a30d5dc4964ae311  modules-load.conf
"
